<script language="Javascript">
	function send(){
		document.getElementById('submit').disabled = (document.getElementById('nom').value<=0)?true:false;
	}
</script>
<?php
class Form_Modifiervip extends Zend_Form{
	public function init(){
		$this->setMethod('post');
		$this->setAction('');
		$this->setName('modifiervip');
		$this->setAttrib('enctype', 'multipart/form-data');
		
		$vips=VipsController::gatAllVipsAction();
		$modif = new Zend_Form_Element_Select('nom');
		$modif->setLabel("VIP a modifier : ")
						->setAttrib('onclick', "send();")
						->addMultiOption(0, "Selectionner le vip");
		foreach($vips as $vip){
			$modif ->addMultiOption( $vip->VIP_NUMERO, $vip->VIP_NOM." ".$vip->VIP_PRENOM);
		}
		$submit = new Zend_Form_Element_Submit('submit');
		$submit->setLabel('Selectionner');
		?>
		<script language="Javascript">
			send();
		</script>
		<?php 
		$this->addElements(array($modif,$submit));
								
		
       $this->setElementDecorators(array('ViewHelper','Description','Errors',
                   array(array('data'=>'HtmlTag'), array('tag' => 'td')),
                   array('Label', array('tag' => 'td')),
                   array(array('row'=>'HtmlTag'),array('tag'=>'tr'))));
                   
		$submit->setDecorators(array(
				'ViewHelper','Description','Errors', array(array('data'=>'HtmlTag'),
				array('tag' => 'td','colspan'=>'2','align'=>'left')),
				array(array('row'=>'HtmlTag'),array('tag'=>'tr'))
       ));
		$this->setDecorators(array('FormElements', array(array('data'=>'HtmlTag'),array('tag'=>'table')),'Form'));
	}
}